package com.demo.study.behavior.d02_command.controller.tv;

import com.demo.study.behavior.d02_command.controller.Receiver;

/**
 * 操作电视的执行者（实际干活的类）
 *
 * @author Baymax
 * @since 2022/3/25
 */
public class TvReceiver implements Receiver {
    private String tvName;

    public TvReceiver(String tvName) {
        this.tvName = tvName;
    }

    @Override
    public void on() {
        System.out.println(tvName + "牌子的电视打开了");
    }

    @Override
    public void off() {
        System.out.println(tvName + "牌子的电视关闭了");
    }
}
